package com.mercycrazy.springframework.beans.factory.config;

import com.mercycrazy.springframework.beans.factory.HierarchicalBeanFactory;
import com.mercycrazy.springframework.core.convert.ConversionService;
import com.mercycrazy.springframework.util.StringValueResolver;
import com.sun.istack.internal.Nullable;

/**
 * 可获取 BeanPostProcessor、BeanClassLoader 等方法的配置化接口
 *
 * @author <a href="mailto:1443424326@qq.com">mercycrazy</a>
 * @since 2022-11-26
 */
public interface ConfigurableBeanFactory extends HierarchicalBeanFactory, SingletonBeanRegistry {

    String SCOPE_SINGLETON = "singleton";

    String SCOPE_PROTOTYPE = "prototype";

    void addBeanPostProcessor(BeanPostProcessor beanPostProcessor);

    void destroySingletons();

    void addEmbeddedValueResolver(StringValueResolver valueResolver);

    String resolveEmbeddedValue(String value);

    void setConversionService(ConversionService conversionService);

    @Nullable
    ConversionService getConversionService();
}
